home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-23 | 1.7 KB | 47 lines | [TEXT/KAHL] |
- // =============================================================================
- // KEYQUENCER EXTENSIONS A4 GLOBAL STORAGE - VERSION 1.2.1 - NOVEMBER 1994
- // ©1994 Alessandro Levi Montalcini <LMontalcini@pmn.it>
- // Don’t forget to send me any cool extensions you create!
- // This text looks best in monaco 9 font, 4 spaces per tab, no wrapping
-
- #ifndef _H_a4globals
- #define _H_a4globals
-
- //==============================================================================
-
- #if defined(powerc) || defined(__powerc) // powerpc
-
- #define MAIN_SETUP_GLOBALS(x) { x = 0; } // to avoid "unused var" warnings
- #define MAIN_RESTORE_GLOBALS(x)
- #define TEMP_SETUP_GLOBALS(x) { x = 0; }
- #define TEMP_RESTORE_GLOBALS(x)
-
- #elif defined(THINK_C) // think c
-
- #include <SetUpA4.h>
- #define MAIN_SETUP_GLOBALS(x) { RememberA0(); SetUpA4(); asm { MOVE.L (A7)+, x } }
- #define MAIN_RESTORE_GLOBALS(x) { asm { MOVE.L x, -(A7) } RestoreA4(); }
- #define TEMP_SETUP_GLOBALS(x) { SetUpA4(); asm { MOVE.L (A7)+, x } }
- #define TEMP_RESTORE_GLOBALS(x) { asm { MOVE.L x, -(A7) } RestoreA4(); }
-
- #elif defined(__MWERKS__) // code warrior
-
- #include <A4Stuff.h>
- #include <SetUpA4.h>
- #define MAIN_SETUP_GLOBALS(x) { x = SetCurrentA4(); RememberA4(); }
- #define MAIN_RESTORE_GLOBALS(x) { (void)SetA4(x); }
- #define TEMP_SETUP_GLOBALS(x) { x = SetUpA4(); }
- #define TEMP_RESTORE_GLOBALS(x) { (void)RestoreA4(x); }
-
- #else // unknown compiler, stop here
-
- #error unsupported compiler
-
- #endif // end of compiler-specific stuff
-
- //==============================================================================
-
- #endif // _H_a4globals
-
- //==============================================================================
-